import os

def file_traverse(path, depth):
    listdir1 = os.listdir(path)
    for i in listdir1:
        print(' ' * depth, i)
        new_path = path + '/' + i
        if os.path.isdir(i):
            file_traverse(new_path, depth + 1)

if __name__ == '__main__':
    pathl=os.getcwd()
    file_traverse(pathl,0)